package com.woniu.user.pojo;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户余额表
 * </p>
 *
 * @author LiFangyu
 * @since 2023-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_customer_balance")
@ApiModel(value="CustomerBalance对象", description="用户余额表")
public class CustomerBalance implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "余额日志ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String balanceId;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "记录来源;1订单")
    private String source;

    @ApiModelProperty(value = "相关单据ID")
    private String sourceSn;

    @ApiModelProperty(value = "变动金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;


}
